package com.micromsg.common.constant;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 枚举类
 */
public class CommonEnum {


    public enum EnableStateEnum {
        ENABLE_STATE_YES((byte) 1, "启用"),
        ENABLE_STATE_NO((byte) 0, "停用");

        private byte code;
        private String msg;

        public byte getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

        EnableStateEnum(byte code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }

    public enum StateFlagEnum {

        STATE_FLAG_NORMAL("0", "正常"),
        STATE_FLAG_DELETE(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()), "删除");

        private String code;
        private String msg;

        public String getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

        StateFlagEnum(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }
}
